package com.springcloud;

import com.springcloud.anno.A;
import com.springcloud.config.MyRibbonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.ComponentScan;

/**
 * @Author 咕唧
 * @Date 2022/6/23 17:04
 * @Version 1.0
 */
@SpringBootApplication
@EnableEurekaClient
//单独设置一个配置
//@RibbonClient(name = "04ADDRESSPROVIDER",configuration = MyRibbonConfig.class)
//当有多个配置时，可以使用RibbonClients这个注解
@RibbonClients({@RibbonClient(name = "04ADDRESSPROVIDER",configuration = MyRibbonConfig.class)})
//告诉包扫描忽略一些类,哪些类? 上面有A注解的类
@ComponentScan(excludeFilters = {@ComponentScan.Filter(value = A.class)})
//@EnableDiscoveryClient
public class OrderStartApp {
    public static void main(String[] args) {
        SpringApplication.run(OrderStartApp.class, args);
    }
}
